
## Snakes on a Payload
## Copyright (C) 2011 CORE Security Technologies
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
##
## Authors:
## 2011/09/11 - Pedro Varangot (pvarangot@)
## 2011/09/11 - Fernando Russ (fruss@)



from waflib.Task import Task
from waflib.TaskGen import extension

class py2bc2h(Task):
    run_str = "python ${PY2BC2H} ${SRC} ${TGT}"
@extension('.tpy')
def call_py2bc2h(self, node):
    tsk = self.create_task('py2bc2h', [node], node.change_ext('.h'))

class so2bin(Task):
    color = "CYAN"
    run_str = "python ${S2LPY} ${SRC} ${TGT} ${SO2BIN_ARGS}"
@extension('.so')
def call_so2bin(self, node):
    task = self.create_task('so2bin', [node], node.change_ext('.bin'))

class testrunner(Task):
    color = "PINK"
    run_str = "${TESTRUNNER_TOOL}  ${SRC}"   
@extension('.test.bin')
def call_testrunner(self, node):
    task = self.create_task('testrunner', [node])

